{% extends "layout.html" %}

{% block title %}海军{% endblock %}

{% block css %}{% endblock %}

{% block cardbody %}
<button onclick="Proims('1')" id="yijianhuoy" type="button" class="layui-btn layui-bg-blue">一键活跃</button>
<button onclick="Proims('2')"  id="GetIbi" type="button" class="layui-btn layui-bg-blue">获取金币</button>
<table class="layui-table" lay-even>
    <!-- Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36 -->

    <thead>
        <tr>
            <th>user_id</th>
            <th>name</th>
            <th>email</th>
            <th>createTime</th>
            <th>Token</th>
            <th>密码</th>
        </tr>
    </thead>
    <tbody>
        {% for obj in userAll%}
        <tr>
            <td>{{ obj.user_id }}</td>
            <td>{{ obj.user_name }}</td>
            <td>{{ obj.user_email }}</td>
            <td>{{ obj.create_Time }}</td>
            <td>{{ obj.token }}</td>
            <td>{{obj.user_pwd}}</td>
        </tr>
        {% endfor %}

    </tbody>
</table>
{% endblock %}

{% block js %}

<script>


    function Proims(Tyape) {
        var loadIndex = layer.msg('加载中', {
            icon: 16,
            shade: 0.5,
            title: "稍等一会...",
            content: "服务器正在进行操作",
            anim: 6,
            time: 0
        });

        axios({
            url: "/index/",
            method: "POST",
            headers: {
                "Content-Type": "application/x-www-form-urlencoded"
            },
            data: {
                "Type": Tyape
            }
        }).then(res => {
            console.log("响应成功: ", res);
            layer.msg(res.data,{
                time:3000
            })
            layer.close(loadIndex);
        }).catch(error => {
            console.error("响应失败: ", error);
            layer.close(loadIndex);
        });
    }



</script>

{% endblock %}